var express = require("express");
var router = express.Router();

/* GET home page. */
router.get("/", function (req, res, next) {
  console.log(req.session);
  if (!req.session.views) {
    req.session.views = 1;
  } else {
    req.session.views++;
  }
  res.render("index", { title: "Express", views: req.session.views });
});

module.exports = router;
